package com.meilai.project.controller.web.market.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.meilai.project.controller.web.market.entity.BillMarketShootRequirement;
import com.meilai.project.controller.web.market.mapper.BillMarketShootRequirementMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xchen
 * @since 2022-07-16
 */
@Service
public class BillMarketShootRequirementServiceImpl extends ServiceImpl<BillMarketShootRequirementMapper, BillMarketShootRequirement> implements BillMarketShootRequirementService {

    @Override
    public void deleteByMarketId(Long marketId) {
        LambdaQueryWrapper<BillMarketShootRequirement> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(BillMarketShootRequirement::getBill_market_id, marketId);
        remove(wrapper);
    }

    @Override
    public List<BillMarketShootRequirement> listByMarketId(Long marketId) {
        LambdaQueryWrapper<BillMarketShootRequirement> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(BillMarketShootRequirement::getBill_market_id, marketId);
        return list(wrapper);
    }


}
